import json

if __name__ == '__main__':
    with open(
            '/home/zhengbian/neural-product-quantization/sample_config/Neural_Weight_Quantization'
            '/short_term_config.json',
            'r') as f:
        config = json.load(f)
    save_base_dir = '/home/zhengbian/neural-product-quantization/config/big_ds'
    dataset_partition_config_l = [
        {
            "type": "kmeans_multiple"
        }
    ]
    for ds_partition_config in dataset_partition_config_l:
        config['dataset_partition'] = ds_partition_config
        config['n_cluster'] = 256
        config['n_instance'] = 8
        with open('%s/nwq_%d_%s_%d.json' % (
                save_base_dir, config['n_instance'], ds_partition_config['type'], config['n_cluster']),
                  'w') as f:
            json.dump(config, f)
